package cn.jy.finanlle.service.impl;


import cn.jy.common.domain.financea.ExpressPaymentRecords;
import cn.jy.common.domain.vo.ExpressPaymentRecordsVo;
import cn.jy.finanlle.mapper.ExpressPaymentRecordsMapper;
import cn.jy.finanlle.service.ExpressPaymentRecordsService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ExpressPaymentRecordsServiceImpl implements ExpressPaymentRecordsService {
    @Autowired
    private ExpressPaymentRecordsMapper expressPaymentRecordsMapper;

    @Override
    public PageInfo<ExpressPaymentRecordsVo> selectExpressPaymentRecordsList(ExpressPaymentRecordsVo expressPaymentRecordsVo) {
        PageHelper.startPage(expressPaymentRecordsVo.getPageNum(), expressPaymentRecordsVo.getPageSize());
        List<ExpressPaymentRecordsVo> expressPaymentRecordsVos = expressPaymentRecordsMapper.selectExpressPaymentRecordsList(expressPaymentRecordsVo);
        PageInfo<ExpressPaymentRecordsVo> expressPaymentRecordsVoPageInfo = new PageInfo<>(expressPaymentRecordsVos);
        return expressPaymentRecordsVoPageInfo;
    }

    @Override
    public ExpressPaymentRecords findExpressPaymentRecordsByPhone(String phone) {
       return expressPaymentRecordsMapper.findExpressPaymentRecordsByPhone(phone);
    }


}
